from django.http import request
from django.shortcuts import render,HttpResponse
from Models.models import Book
from django.core import serializers

class queryCount():
    def index(request):
        # 查询所有数据的总条数
        books = Book.objects.count()
        print(books)
        # 查询满足条件的总条数
        book = Book.objects.filter(price=200).count()
        print(book)
        return HttpResponse('<p>查询成功</p>')